<template>
  <div class="detail-shop">
    <div class="detail-logo">
      <div class="imgg"><img :src="shop.logo" alt=""></div>
      <div class="name">{{shop.name}}</div>
    </div>
    <div class="de">
      <div class="left">
        <div class="sell">
          <span style="font-size:19px">{{shop.sells}}</span><br>
          <div style="font-size:13px;margin-top:-20px">总销量</div>
        </div>
        <div class="count">
          <span style="font-size:19px">{{shop.goodsCount}}</span><br>
          <div style="font-size:13px;margin-top:-20px">全部宝贝</div>
        </div>
      </div>
      <div class="right">
        <div v-for="(item,index) in shop.score" :key="index">
          <div class="aa">
            <span>{{item.name}}</span>
            <span :style="{color:item.isBetter?'red':'green'}" style="padding-left:10px">{{item.score}}</span>
            <div :style="{background:item.isBetter?'red':'green'}" class="bg">{{item.isBetter?"高":"低"}}</div>
          </div>
        </div>
      </div>
    </div>
    <div class="in">进店逛逛</div>
  </div>
</template>

<script>
export default {
  name: 'detailShopInfo',
  props:{
    shop:{
      type: Object,
      default(){
        return {}
      }
    },
    data:{
      return(){
        
      }
    }
  }
}
</script>

<style scoped>
  .detail-shop{
    width: 100%;
  }

  .detail-logo{
    width: 100%;
    height: 90px;
  }
  .detail-logo .imgg{
    width: 50px;
    height: 50px;
    border-radius: 50px;  
    border: solid 1px rgb(179, 170, 170);
    overflow: hidden;
    margin-top: 20px;
    margin-left: 10px;
    float: left;
  }
  .detail-logo img{
    max-width: 100%;
  }

  .name{
    float: right;
    margin-top: 35px;
    font-size: 18px;
    width: 80%;
  }


  .de{
    width: 100%;
    height: 90px;
    color: black;
  }

  .left{
    width: 50%;
    float: left;
    height:60px;
    border-right: rgb(168, 168, 168) 1px solid
  }

  .sell{
    width: 50%;
    float: left;
    padding-left: 20px;
    text-align: center;
  }
  .count{
    float: right;
    text-align: center;
    width: 50%;
    padding-right: 20px;
  }


  .right{
    width: 50%;
    font-size: 14px;
  }
  .aa{
    width: 100%;
    margin-top: -20px;
    padding-left: 20px;
  }

  .bg{
    color:white; 
    float:right;
    right:10px;
    display:block;
    height:15px;
    line-height:15px;
    margin-top: 13px;
    margin-right: 20px;
  }

  .in{
    width: 40%;
    margin: 0 auto;
    background-color: rgb(228, 228, 228);
    color: rgb(65, 65, 65);
    height: 30px;
    line-height: 30px;
    border-radius: 10px;
    padding-left: 40px;
  }
</style>